package org.example.chat.service.impl;

import org.example.chat.dao.SystemLogRepository;
import org.example.chat.entity.SystemLog;
import org.example.chat.service.ISystemLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * @author cheva
 */
@Service
public class SystemLogServiceImpl extends BaseService implements ISystemLogService {

    @Autowired
    private SystemLogRepository systemLogRepository;

    @Override
    public List<SystemLog> queryByPage(int pageNo, int pageSize) {
        int offset = (pageNo - 1) * pageSize;
        return systemLogRepository.findByPage(offset, pageSize);
    }
}
